package com.ydd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ydd.entity.SysRoleMenu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
    @Select(" select  * from sys_role_menu where role_id= #{id}")
    List<SysRoleMenu> getMenuById(String id);

    /**
     * 删除角色权限
     * @param id
     */
    @Delete("delete from sys_role_menu where role_id = #{id}")
    void deleteId(String id);




    /**
     * 插入权限id
     * @param id
     * @param menuId
     */
    void insertMenu(@Param("id") String id, @Param("menuId") String menuId);
}
